//
//  HJInviteJourneyRightCell.m
//  project
//
//  Created by jc on 2019/5/14.
//  Copyright © 2019 健健. All rights reserved.
//

#import "HJInviteJourneyRightCell.h"
#import "HJChatTextMsgModel.h"
#import "YFJourneyModel.h"

@interface HJInviteJourneyRightCell ()
@property (weak, nonatomic) IBOutlet UIImageView *avatorImageView;
@property (weak, nonatomic) IBOutlet UIView *bgView;
@property (weak, nonatomic) IBOutlet UILabel *name;
@property (weak, nonatomic) IBOutlet UILabel *createTime;
@property (weak, nonatomic) IBOutlet UILabel *location;
@property (weak, nonatomic) IBOutlet UIButton *sendError;
@property (weak, nonatomic) IBOutlet UIButton *inviteBtn;// 邀请按钮
@end
@implementation HJInviteJourneyRightCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    [self.contentView setupShadowWithView:self.bgView];
    [self.avatorImageView rounded:UIRectCornerAllCorners radius:20 borderColor:[UIColor blackColor] borderWidth:1];
    @weakify(self)
    [[self.inviteBtn rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(__kindof UIControl * _Nullable x) {
        @strongify(self)
        self.rightCellClickedBlock();
    }];
}

-(void)loadRightData:(HJSimpleModel *)model {
    [self.avatorImageView sd_setImageWithURL: [NSURL URLWithString:[HJUserManager getUserModel].avatar] placeholderImage:setImage(@"img_mydongtai_defualt_avatar")];
    self.createTime.text = model.data.team.startTime;
    self.location.text = model.data.team.startText;
}

@end
